<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单确认</title>
    <style>
      h3{
        text-align: center;
      }
      table{
        border-collapse: collapse;
        margin: 0 auto;
      }
      table,tr,th,td{
        border: 1px solid black;
      }
      td{
        text-align: center;
      }
    </style>
</head>
<body>
<h3>订单确认</h3>
  <script>
    let price = +prompt('请输入商品价格');
    let num = +prompt('请输入商品数量');
    let total = price * num;
    let address = prompt('请输入收货地址');
    document.write(`
      <table>
        <tr>
          <th>商品名称</th>
          <th>商品价格</th>
          <th>商品数量</th>
          <th>总价</th>
          <th>收货地址</th>
        </tr>
        <tr>
          <td>小米手机青春PLUS</td>
          <td>${price}元</td>
          <td>${num}</td>
          <td>${total}元</td>
          <td>${address}</td>
        </tr>
    </table>
    `);//使用document.write将输入款打印在网页上面，配合我们的字符串模板${变量}实现原始的交互
  </script>
</body>
</html>